define(
		[ "PDAppDir/properties", "PDUtilDir/util", "PDUtilDir/tool", "PDUtilDir/slidebar",
				"PDUtilDir/inputSelect",
				"PDUtilDir/fileupload/singleFileUpload", "Date", "DateCN",
				"css!DateCss", "PicView", "css!picViewCss",
				"css!AppPathDir/order/orderInfos/views/css/css" ],
		function(Properties, Util, Tool, Slidebar, inputSelect, MFU) {
			function detailSupportInit($scope, $compile) {
				return new detailSupport($scope, $compile);
			}
			function detailSupport($scope, $compile) {
				this.$scope = $scope;
				this.$compile = $compile;
				
				this.entity = {
						orderNo: '001',
						groupName: '002',
						supplerOrgName: '003',
						shouldPayment: '004',
						actualPayment: '005',
						timeTableName: '006',
						payStatusName: '007',
						createTime: '008',
						modifyTime: '009',
						payment: '010',
						id: '011'
				};
				
			}
			detailSupport.fn = detailSupport.prototype;
			detailSupport.fn.digest = function() {
				this.$scope.$digest();
			}
			detailSupport.fn.run = function(id) {
				var _this = this, data = undefined, dataArray = _this.$scope.grid.getAllData(), len = dataArray.length;
//				for (var i = 0; i < len; i++) {
//					if (id == data.id) {
//						data = dataArray[i];
//					}
//				}
//				_this.entity = $.extend(_this.entity, data);
//				var tmp_status = _this.$scope.cache.status;
//				len = tmp_status.length;
//				
//				if (tmp_status){
//					for (var i = 0; i < tmp_status.length; i++) {
//						if (tmp_status[i].dictCode == _this.entity.payStatus) {
//							_this.entity.payStatusName = tmp_status[i].dictName;
//						}
//					}
//				}
				this.slidebars = Slidebar({
					size : 'lg',
					url : getServer()
							+ "/static/app/order/refundInfos/views/detail.html",
//					close : true,
					$scope : this.$scope,
					$compile : this.$compile,
					afterLoad : function($Panel) {
						_this.initialization();
					}
				});
			};
			detailSupport.fn.initialization = function() {
				// console.info(this.entity);
				this.digest();
			};
			return detailSupportInit;
		});